﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Business;
using System.Web.Configuration;
using Domain;

namespace HotelBrisaYArenaAdministrador
{
    public partial class ModComoLlegar : System.Web.UI.Page
    {

        int idSeccion, idPagina;
        SeccionBusiness seccionBusiness = new SeccionBusiness(WebConfigurationManager.ConnectionStrings["ApplicationServices"].ToString());
        ImagenBusiness imagenBusiness = new ImagenBusiness(WebConfigurationManager.ConnectionStrings["ApplicationServices"].ToString());
        protected void Page_Load(object sender, EventArgs e)
        {
            Seccion seccion = new Seccion();
            seccion = seccionBusiness.GetSeccion(4);
            if (!Page.IsPostBack)
            {
                txbDescripcion.Text = seccion.Descripcion;
            }
            idSeccion = seccion.IdSeccion;
            idPagina = seccion.IdPagina;
        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            String descripcion = txbDescripcion.Text;
            seccionBusiness.ActualizarDescripcionSeccion(descripcion, idPagina, idSeccion);
            Response.Redirect("PaginaPrincipal.aspx");
        }
    }
}